/**
 * 
 */
package com.brucexx.wedding.controller;

import java.io.IOException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.bind.annotation.RequestMapping;

import com.google.appengine.api.users.UserService;
import com.google.appengine.api.users.UserServiceFactory;

/**
 * @author  BruceXX  email:brucest0078@gmail.com
 *
 */
public class TestController {
	

    @RequestMapping(value = "/test.action")
    public String handleManage(HttpServletRequest request, HttpServletResponse response) throws IOException {
    	UserService userService = UserServiceFactory.getUserService();
    	if(userService.isUserAdmin()){
    		return "test";
    	}else{
    		return "admin/no_permission";
    	}
    	
    }

     
}
